import httpFetch from "share/httpFetch";

export default {
  savePrintRule(params){
    return httpFetch[params.optionId ? 'put' : 'post'](`/api/fm/print/option/${params.optionId ? 'update' : 'insert'}/dto`, params);
  },

  savePayTypeService(params){
    return httpFetch.post(`/payment/api/cash/payment/method`, params);
  },

  savePayBasicRule(params){
    return httpFetch.post(`/payment/api/finance/payment/saveOrUpdate`, params)
  },

  saveRefundRule(params){
    return httpFetch.post(`/api/repayment/option/saveOrUpdate`, params)
  },

  saveCashRule(params){
    return httpFetch.post(`/api/loan/option/saveOrUpdate`, params)
  },

  saveAuthorization(params) {
    return httpFetch.post('/api/companyBankAuth/insertOrUpdate', params);
  },

  saveApyType(params) {
    return httpFetch.post('/api/comapnyBankPayment', params);
  },

  saveLoanRule(params) {
    return httpFetch[params.id ? 'put' : 'post'](`/api/cash/transaction/classes`, params)
  },

  saveAccountRule(params) {
    return httpFetch[params.optionId ? 'put' : 'post'](`/api/ledger/option`, params);
  },

  handleTypeRule(params) {
    return httpFetch.post(`/api/prepayment/type`, params)
  }
}
